import { log } from "@juzi/wechaty";
import { SocketTypeEnum } from "../websocket/socketTypeEnum.js";
const mLogin = async (user, bot, sendMessageToAll) => {
  log.info("StarterBot", "%s login", user);
  sendMessageToAll({
    Type: SocketTypeEnum.Console,
    Data: `StarterBot, ${user} login`,
  });
  // const room = await bot.Room.load(
  //   "@@f44e4866b85e576077f011ce93061bb5f170f397334fad2f52e7ea2a98606481"
  // );
  // const rooms = await bot.Room.findAll();
  // console.log("全部群聊:", rooms);

  // console.log("room", room.id);
  // if (room) {
  //   await room.say("这是推送到特定群聊的消息");
  // }
};

export default mLogin;
